package com.kitten.chatglmsdk.model;

import java.util.List;

public class ChatCompletionSyncResponse {
    private Integer code;
    private String msg;
    private Boolean success;
    private ChatGLMData data;
    private String task_status;
    private List<Choice> choices;

    public void setChoices(List<Choice> choices) {
        this.choices = choices;
        this.data = new ChatGLMData();
        this.data.setChoices(choices);
    }

    public ChatCompletionSyncResponse() {
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public Boolean getSuccess() {
        return this.success;
    }

    public ChatGLMData getData() {
        return this.data;
    }

    public String getTask_status() {
        return this.task_status;
    }

    public List<Choice> getChoices() {
        return this.choices;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public void setData(ChatGLMData data) {
        this.data = data;
    }

    public void setTask_status(String task_status) {
        this.task_status = task_status;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ChatCompletionSyncResponse)) {
            return false;
        } else {
            ChatCompletionSyncResponse other = (ChatCompletionSyncResponse)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$code = this.getCode();
                Object other$code = other.getCode();
                if (this$code == null) {
                    if (other$code != null) {
                        return false;
                    }
                } else if (!this$code.equals(other$code)) {
                    return false;
                }

                Object this$success = this.getSuccess();
                Object other$success = other.getSuccess();
                if (this$success == null) {
                    if (other$success != null) {
                        return false;
                    }
                } else if (!this$success.equals(other$success)) {
                    return false;
                }

                Object this$msg = this.getMsg();
                Object other$msg = other.getMsg();
                if (this$msg == null) {
                    if (other$msg != null) {
                        return false;
                    }
                } else if (!this$msg.equals(other$msg)) {
                    return false;
                }

                label62: {
                    Object this$data = this.getData();
                    Object other$data = other.getData();
                    if (this$data == null) {
                        if (other$data == null) {
                            break label62;
                        }
                    } else if (this$data.equals(other$data)) {
                        break label62;
                    }

                    return false;
                }

                label55: {
                    Object this$task_status = this.getTask_status();
                    Object other$task_status = other.getTask_status();
                    if (this$task_status == null) {
                        if (other$task_status == null) {
                            break label55;
                        }
                    } else if (this$task_status.equals(other$task_status)) {
                        break label55;
                    }

                    return false;
                }

                Object this$choices = this.getChoices();
                Object other$choices = other.getChoices();
                if (this$choices == null) {
                    if (other$choices != null) {
                        return false;
                    }
                } else if (!this$choices.equals(other$choices)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof ChatCompletionSyncResponse;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $code = this.getCode();
        result = result * 59 + ($code == null ? 43 : $code.hashCode());
        Object $success = this.getSuccess();
        result = result * 59 + ($success == null ? 43 : $success.hashCode());
        Object $msg = this.getMsg();
        result = result * 59 + ($msg == null ? 43 : $msg.hashCode());
        Object $data = this.getData();
        result = result * 59 + ($data == null ? 43 : $data.hashCode());
        Object $task_status = this.getTask_status();
        result = result * 59 + ($task_status == null ? 43 : $task_status.hashCode());
        Object $choices = this.getChoices();
        result = result * 59 + ($choices == null ? 43 : $choices.hashCode());
        return result;
    }

    public String toString() {
        return "ChatCompletionSyncResponse(code=" + this.getCode() + ", msg=" + this.getMsg() + ", success=" + this.getSuccess() + ", data=" + this.getData() + ", task_status=" + this.getTask_status() + ", choices=" + this.getChoices() + ")";
    }

    public static class Message {
        private String role;
        private String content;

        public Message() {
        }

        public String getRole() {
            return this.role;
        }

        public String getContent() {
            return this.content;
        }

        public void setRole(String role) {
            this.role = role;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public boolean equals(Object o) {
            if (o == this) {
                return true;
            } else if (!(o instanceof Message)) {
                return false;
            } else {
                Message other = (Message)o;
                if (!other.canEqual(this)) {
                    return false;
                } else {
                    Object this$role = this.getRole();
                    Object other$role = other.getRole();
                    if (this$role == null) {
                        if (other$role != null) {
                            return false;
                        }
                    } else if (!this$role.equals(other$role)) {
                        return false;
                    }

                    Object this$content = this.getContent();
                    Object other$content = other.getContent();
                    if (this$content == null) {
                        if (other$content != null) {
                            return false;
                        }
                    } else if (!this$content.equals(other$content)) {
                        return false;
                    }

                    return true;
                }
            }
        }

        protected boolean canEqual(Object other) {
            return other instanceof Message;
        }

        public int hashCode() {
            boolean PRIME = true;
            int result = 1;
            Object $role = this.getRole();
            result = result * 59 + ($role == null ? 43 : $role.hashCode());
            Object $content = this.getContent();
            result = result * 59 + ($content == null ? 43 : $content.hashCode());
            return result;
        }

        public String toString() {
            return "ChatCompletionSyncResponse.Message(role=" + this.getRole() + ", content=" + this.getContent() + ")";
        }
    }

    public static class Choice {
        private String role;
        private String content;
        private String finish_reason;
        private int index;
        private Message message;

        public Choice() {
        }

        public String getRole() {
            return this.role;
        }

        public String getContent() {
            return this.content;
        }

        public String getFinish_reason() {
            return this.finish_reason;
        }

        public int getIndex() {
            return this.index;
        }

        public Message getMessage() {
            return this.message;
        }

        public void setRole(String role) {
            this.role = role;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public void setFinish_reason(String finish_reason) {
            this.finish_reason = finish_reason;
        }

        public void setIndex(int index) {
            this.index = index;
        }

        public void setMessage(Message message) {
            this.message = message;
        }

        public boolean equals(Object o) {
            if (o == this) {
                return true;
            } else if (!(o instanceof Choice)) {
                return false;
            } else {
                Choice other = (Choice)o;
                if (!other.canEqual(this)) {
                    return false;
                } else if (this.getIndex() != other.getIndex()) {
                    return false;
                } else {
                    label61: {
                        Object this$role = this.getRole();
                        Object other$role = other.getRole();
                        if (this$role == null) {
                            if (other$role == null) {
                                break label61;
                            }
                        } else if (this$role.equals(other$role)) {
                            break label61;
                        }

                        return false;
                    }

                    label54: {
                        Object this$content = this.getContent();
                        Object other$content = other.getContent();
                        if (this$content == null) {
                            if (other$content == null) {
                                break label54;
                            }
                        } else if (this$content.equals(other$content)) {
                            break label54;
                        }

                        return false;
                    }

                    Object this$finish_reason = this.getFinish_reason();
                    Object other$finish_reason = other.getFinish_reason();
                    if (this$finish_reason == null) {
                        if (other$finish_reason != null) {
                            return false;
                        }
                    } else if (!this$finish_reason.equals(other$finish_reason)) {
                        return false;
                    }

                    Object this$message = this.getMessage();
                    Object other$message = other.getMessage();
                    if (this$message == null) {
                        if (other$message != null) {
                            return false;
                        }
                    } else if (!this$message.equals(other$message)) {
                        return false;
                    }

                    return true;
                }
            }
        }

        protected boolean canEqual(Object other) {
            return other instanceof Choice;
        }

        public int hashCode() {
            boolean PRIME = true;
            int result = 1;
            result = result * 59 + this.getIndex();
            Object $role = this.getRole();
            result = result * 59 + ($role == null ? 43 : $role.hashCode());
            Object $content = this.getContent();
            result = result * 59 + ($content == null ? 43 : $content.hashCode());
            Object $finish_reason = this.getFinish_reason();
            result = result * 59 + ($finish_reason == null ? 43 : $finish_reason.hashCode());
            Object $message = this.getMessage();
            result = result * 59 + ($message == null ? 43 : $message.hashCode());
            return result;
        }

        public String toString() {
            return "ChatCompletionSyncResponse.Choice(role=" + this.getRole() + ", content=" + this.getContent() + ", finish_reason=" + this.getFinish_reason() + ", index=" + this.getIndex() + ", message=" + this.getMessage() + ")";
        }
    }

    public static class Usage {
        private int completion_tokens;
        private int prompt_tokens;
        private int total_tokens;

        public Usage() {
        }

        public int getCompletion_tokens() {
            return this.completion_tokens;
        }

        public int getPrompt_tokens() {
            return this.prompt_tokens;
        }

        public int getTotal_tokens() {
            return this.total_tokens;
        }

        public void setCompletion_tokens(int completion_tokens) {
            this.completion_tokens = completion_tokens;
        }

        public void setPrompt_tokens(int prompt_tokens) {
            this.prompt_tokens = prompt_tokens;
        }

        public void setTotal_tokens(int total_tokens) {
            this.total_tokens = total_tokens;
        }

        public boolean equals(Object o) {
            if (o == this) {
                return true;
            } else if (!(o instanceof Usage)) {
                return false;
            } else {
                Usage other = (Usage)o;
                if (!other.canEqual(this)) {
                    return false;
                } else if (this.getCompletion_tokens() != other.getCompletion_tokens()) {
                    return false;
                } else if (this.getPrompt_tokens() != other.getPrompt_tokens()) {
                    return false;
                } else {
                    return this.getTotal_tokens() == other.getTotal_tokens();
                }
            }
        }

        protected boolean canEqual(Object other) {
            return other instanceof Usage;
        }

        public int hashCode() {
            boolean PRIME = true;
            int result = 1;
            result = result * 59 + this.getCompletion_tokens();
            result = result * 59 + this.getPrompt_tokens();
            result = result * 59 + this.getTotal_tokens();
            return result;
        }

        public String toString() {
            return "ChatCompletionSyncResponse.Usage(completion_tokens=" + this.getCompletion_tokens() + ", prompt_tokens=" + this.getPrompt_tokens() + ", total_tokens=" + this.getTotal_tokens() + ")";
        }
    }

    public static class ChatGLMData {
        private List<Choice> choices;
        private String task_status;
        private Usage usage;
        private String task_id;
        private String request_id;

        public ChatGLMData() {
        }

        public List<Choice> getChoices() {
            return this.choices;
        }

        public String getTask_status() {
            return this.task_status;
        }

        public Usage getUsage() {
            return this.usage;
        }

        public String getTask_id() {
            return this.task_id;
        }

        public String getRequest_id() {
            return this.request_id;
        }

        public void setChoices(List<Choice> choices) {
            this.choices = choices;
        }

        public void setTask_status(String task_status) {
            this.task_status = task_status;
        }

        public void setUsage(Usage usage) {
            this.usage = usage;
        }

        public void setTask_id(String task_id) {
            this.task_id = task_id;
        }

        public void setRequest_id(String request_id) {
            this.request_id = request_id;
        }

        public boolean equals(Object o) {
            if (o == this) {
                return true;
            } else if (!(o instanceof ChatGLMData)) {
                return false;
            } else {
                ChatGLMData other = (ChatGLMData)o;
                if (!other.canEqual(this)) {
                    return false;
                } else {
                    label71: {
                        Object this$choices = this.getChoices();
                        Object other$choices = other.getChoices();
                        if (this$choices == null) {
                            if (other$choices == null) {
                                break label71;
                            }
                        } else if (this$choices.equals(other$choices)) {
                            break label71;
                        }

                        return false;
                    }

                    Object this$task_status = this.getTask_status();
                    Object other$task_status = other.getTask_status();
                    if (this$task_status == null) {
                        if (other$task_status != null) {
                            return false;
                        }
                    } else if (!this$task_status.equals(other$task_status)) {
                        return false;
                    }

                    label57: {
                        Object this$usage = this.getUsage();
                        Object other$usage = other.getUsage();
                        if (this$usage == null) {
                            if (other$usage == null) {
                                break label57;
                            }
                        } else if (this$usage.equals(other$usage)) {
                            break label57;
                        }

                        return false;
                    }

                    Object this$task_id = this.getTask_id();
                    Object other$task_id = other.getTask_id();
                    if (this$task_id == null) {
                        if (other$task_id != null) {
                            return false;
                        }
                    } else if (!this$task_id.equals(other$task_id)) {
                        return false;
                    }

                    Object this$request_id = this.getRequest_id();
                    Object other$request_id = other.getRequest_id();
                    if (this$request_id == null) {
                        if (other$request_id == null) {
                            return true;
                        }
                    } else if (this$request_id.equals(other$request_id)) {
                        return true;
                    }

                    return false;
                }
            }
        }

        protected boolean canEqual(Object other) {
            return other instanceof ChatGLMData;
        }

        public int hashCode() {
            boolean PRIME = true;
            int result = 1;
            Object $choices = this.getChoices();
            result = result * 59 + ($choices == null ? 43 : $choices.hashCode());
            Object $task_status = this.getTask_status();
            result = result * 59 + ($task_status == null ? 43 : $task_status.hashCode());
            Object $usage = this.getUsage();
            result = result * 59 + ($usage == null ? 43 : $usage.hashCode());
            Object $task_id = this.getTask_id();
            result = result * 59 + ($task_id == null ? 43 : $task_id.hashCode());
            Object $request_id = this.getRequest_id();
            result = result * 59 + ($request_id == null ? 43 : $request_id.hashCode());
            return result;
        }

        public String toString() {
            return "ChatCompletionSyncResponse.ChatGLMData(choices=" + this.getChoices() + ", task_status=" + this.getTask_status() + ", usage=" + this.getUsage() + ", task_id=" + this.getTask_id() + ", request_id=" + this.getRequest_id() + ")";
        }
    }
}
